package com.oneapm.jvmerror;

/**
 * @Filename: JavaVMStackSOF
 * @Description: -Xss256k
 * @Author: spark
 * @Time: 12/18/16
 */
public class JavaVMStackSOF {
    private int stackLength = 1;

    public void stackLeak(){
        stackLength++;
        stackLeak();
    }

    public static void main(String[] args) {
        JavaVMStackSOF oom = new JavaVMStackSOF();
        try {
            oom.stackLeak();
        } catch (Exception e) {
            System.out.println("stack length:" + oom.stackLength);
            throw e;
        }
    }
}
